// const jwt = require('jsonwebtoken');
const db = require('../models/index.js')
const AjaxResult = require('../utils/AjaxResult.js');

class BlindDatesMemberController {

  /**
   * 获取相亲人员列表
   * @param {*} ctx 
   * @param {*} next 
   * @returns 
   */
  async blindDatesMemberList (ctx, next) {
    const token = ctx.request.headers.authorization;
    // 验证token
    if (!token) {
      AjaxResult.error(ctx, '401', 'token不存在')
      return
    }

    const res = await db.BlindDatesMember.findAll()
    console.log('相亲人员表 ', res)
    AjaxResult.success(ctx, res)
  }
}

module.exports = new BlindDatesMemberController(); // 导出实例